using System;

namespace CardsEngine.Poker
{
	public class PokerSettings
	{
		/// <summary>Enumerates the types of limits which can be used in a Poker game</summary>
		public enum LimitType
		{ NO_LIMIT=0, SIMPLE_FIXED_LIMIT, POT_LIMIT }

		public LimitType limit_type;

		public decimal bet_limit;
		public decimal small_blind;
		public decimal big_blind;
		public decimal ante;

		/// <summary>
		/// Initializes a new instance of the <see cref="CardsEngine.Poker.PokerSettings"/> class.
		/// </summary>
		/// <description>Initializes a new instance of the
		/// <see cref="CardsEngine.Poker.PokerSettings"/> class.
		/// Note that the instance is not guaranteed to contain valid settings. To guarantee immediate validity,
		/// use GetDefault() instead of calling the constructor directly.</description>
		public PokerSettings ()
		{ }

		/// <summary>
		/// Obtain a new instance with the default settings
		/// </summary>
		/// <returns>
		/// A new instance representing the default poker game settings
		/// </returns>
		public static PokerSettings GetDefault()
		{
			PokerSettings result = new PokerSettings();
			MkDefault(result);
			return result;
		}

		/// <summary>
		/// Populates an instance with the default settings
		/// </summary>
		/// <param name='settings'>
		/// The instance to populate with default settings
		/// </param>
		public static void MkDefault (PokerSettings settings)
		{
			settings.ante = 0;
			settings.big_blind = 50;
			settings.limit_type = LimitType.NO_LIMIT;
			settings.small_blind = settings.big_blind / 2;
		}
	}
}

